package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.ItemMapper;
import com.whq.entity.Item;
import com.whq.service.ItemService;

@Service(value = "tdItemService")
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemMapper<Item>tdItemMapper;
    
    @Override
    public Integer insertSelective(Item tdItem) throws Exception {
           return this.tdItemMapper.insertSelective(tdItem);
        }

    @Override
    public Integer insertBatch(List<Item> tdItem) throws Exception {
           return this.tdItemMapper.insertBatch(tdItem) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdItemMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdItemMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Item tdItem) {
           return this.tdItemMapper.updateByPrimaryKeySelective(tdItem);
    }

    @Override
    public Item findById(Object id) {
           return (Item) this.tdItemMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Item> selectByCondition(Item tdItem) {
           return (List<Item>) this.tdItemMapper.selectByCondition(tdItem);
    }

    @Override
    public Integer selectCountByCondition(Item tdItem) {
           return  this.tdItemMapper.selectCountByCondition(tdItem);
    }

}
